package Encoder;

import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStreamWriter;

/**
 * @author wuhan
 * @date 2019/10/15 12:23
 */
public class Demo {
    public static void main(String[] args) throws IOException {
        writeText();

    }


    public static void writeText() throws IOException {
        OutputStreamWriter osw=new OutputStreamWriter(new FileOutputStream("gbk.txt"),"GBK");
        osw.write("你好");
        osw.close();
    }

}
